<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>成绩统计</title>
    
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<script src="js/jquery.min.js"></script>
	<script src="js/f/default.js"></script>
	<link rel="stylesheet" type="text/css" href="css/f/navs.css">
	<link rel="stylesheet" type="text/css" href="css/f/default.css">
	<link rel="stylesheet" type="text/css" href="css/f/assignment.css"/>
	<link rel="stylesheet" type="text/css" href="css/f/biaogechongxie.css">
	<link rel="stylesheet" type="text/css" href="css/f/yhy.css">
  </head>
  <body>
  <div class="all">
  	<jsp:include page="/nav.jsp"></jsp:include>
	  	<div class="rightall float-left">
		  	<div class="already">
			  	<div class="already-title">
			  		<div class="left">成绩统计 </div>
			  	</div>
	    		<div class="abc">
					<form method="post" action="cadre/queryExamInfo.do">
						<input class="btn-style-er" type="submit" name="search" value="搜索"><br/>
						<input type="hidden" name="pageno" value="${pageNo }" />
						<select class="danxuaner" name="examtype">
							<option value="all">全部科目</option>
							<c:forEach var="type" items="${examtypes}">
								<option value="${type.examTypeName }">${type.examTypeName}</option>
							</c:forEach>	
						</select>
						<select class="danxuan" name="examname">
							<option value="all">全部科目</option>
							<c:forEach var="e" items="${exams}">
								<option value="${e.courseName }">${e.courseName }</option>
							</c:forEach>
						</select>	
					</form>
				</div><br/>
				<table>
					<tr class="tr-style-head">
						<td>科目</td>
						<td>考试应到人数</td>
						<td>实到人数</td>
						<td>及格人数</td>
						<td>不及格人数</td>
						<td>平均分</td>
					</tr>
					<c:forEach var="list" items="${tongji}">
						<tr>					
							<td>${list.courseName }</td>
							<td>${list.examSupposedCount }</td>
							<td>${list.examAttendanceCount }</td>
							<td>${list.passCount }</td>
							<td>${list.notPasscount }</td>
							<td>${list.average }</td>
						</tr>
					</c:forEach>
				</table>
                <c:if test="${totalPage > 1 }">
               		<div class="previous">
	               		<c:if test="${pageNo>1}">
	                    	<a href="cadre/queryExamInfo.do?pageNo=${pageNo-1 }">上一页</a>
	                	</c:if>
	                   	<c:forEach var="p" begin="1" end="${totalPage }" step="1">
	                   		<c:if test="${p==pageNo }">
	                   			<span style="font-size:18px;color:#446ee6;">&nbsp;${p}&nbsp;</span>
	                   		</c:if>
	                   		<c:if test="${p!=pageNo }">
	                   			<a href="cadre/queryExamInfo.do?pageNo=${p }" >&nbsp;${p}&nbsp;</a>
	                   		</c:if>
	                   	</c:forEach>
	                    <c:if test="${pageNo<totalPage}">
	                    	<a href="cadre/queryExamInfo.do?pageNo=${pageNo+1 }">下一页</a>
	                	</c:if>
                   </div>
                </c:if>
                <!-- <div class="float-right excel"><button name="" class="btn-style">导出文件</button></div> -->
			</div>
		</div>
	</div>
  </body>
</html>
